#ifndef __KBOX_H__
#define __KBOX_H__

#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <signal.h>
#include <stdbool.h>
#include <arpa/inet.h>
#include <sys/epoll.h>
#include <sys/socket.h>

#include "kbox_utility.h"
#include "epoll_entry.h"
#include "kbox_array.h"
#include "kbox_rbtree.h"
#include "kbox_hash.h"

#define KBOX_MAX_TOKENS 128

#define ENABLE_ARRAY_KBOX 1
#define ENABLE_RBTREE_KBOX 1
#define ENABLE_HASH_KBOX 1

#define NETWORK_EPOLL 0
#define NETWORK_NOYCO 1
#define NETWORK_IOURING 2
#define ENABLE_NETWORK_SELECT NETWORK_NOYCO

int NtyEntry(void);
int KBoxResponse();
int KBoxRequest(ConnItem *item);
int KBoxParseProtocol(ConnItem *item, char **tokens, int count);

#if split == 0
int KBoxSplitToken(char *msg, char **tokens);
#endif

#endif